/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmSupervision extends BasicModel<PmSupervision> {
  name?: string; // 单位名称
  createDate?: string; // 创建时间
  number?: string; // 单位账号
  area?: string; // 单位区域
  telephonenum?: string; // 联系电话
}

export const pmSupervisionList = (params?: PmSupervision | any) =>
  defHttp.get<PmSupervision>({ url: adminPath + '/orther/supervision/pmSupervision/list', params });

export const pmSupervisionListData = (params?: PmSupervision | any) =>
  defHttp.post<Page<PmSupervision>>({ url: adminPath + '/orther/supervision/pmSupervision/listData', params });

export const pmSupervisionForm = (params?: PmSupervision | any) =>
  defHttp.get<PmSupervision>({ url: adminPath + '/orther/supervision/pmSupervision/form', params });

export const pmSupervisionSave = (params?: any, data?: PmSupervision | any) =>
  defHttp.postJson<PmSupervision>({ url: adminPath + '/orther/supervision/pmSupervision/save', params, data });

export const pmSupervisionDisable = (params?: PmSupervision | any) =>
  defHttp.get<PmSupervision>({ url: adminPath + '/orther/supervision/pmSupervision/disable', params });

export const pmSupervisionEnable = (params?: PmSupervision | any) =>
  defHttp.get<PmSupervision>({ url: adminPath + '/orther/supervision/pmSupervision/enable', params });

export const pmSupervisionDelete = (params?: PmSupervision | any) =>
  defHttp.get<PmSupervision>({ url: adminPath + '/orther/supervision/pmSupervision/delete', params });

export const pmContractorTreeData = (params?: PmSupervision | any) =>
  defHttp.post<PmSupervision>({ url: adminPath + '/orther/ven/pmContractor/treeData', params });
export const pmSupervisionTreeData = (params?: PmSupervision | any) =>
  defHttp.post<PmSupervision>({ url: adminPath + '/orther/supervision/pmSupervision/treeData', params });
